If we don't this for a nested grabFocus grab, the notify::key-focus
will be called, not think that the new key focus is part of the
grab, and cancel the full grab. This leaves the grab helper in an
inconsistent and confused state, as the grab is pushed onto the
grab stack after.
https://bugzilla.gnome.org/show_bug.cgi?id=693975
if (params.grabFocus && !this._takeFocusGrab(hadFocus))
return false;
+ this._grabStack.push(params);
+
if (params.focus) {
params.focus.grab_key_focus();
} else if (newFocus && (hadFocus || params.grabFocus)) {
if ((params.grabFocus || params.modal) && !this._capturedEventId)
this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
- this._grabStack.push(params);
return true;
},